package com.sz.biz.logistics.core.entity;

import com.sz.common.base.dao.ext.IEnum;

/**
 * 产品服务属性
 */
public enum ProductServicePropertyEnum implements IEnum {
    MAIN("MAIN", "主服务"),
    REQUIRED("REQUIRED", "必选服务"),
    OPTIONAL("OPTIONAL", "可选服务");

    private String code;
    private String name;

    ProductServicePropertyEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    @Override
    public String getCode() {
        return this.code;
    }

    @Override
    public String getName() {
        return this.name;
    }

    public static ProductServicePropertyEnum valueOfEnum(String code) {
        ProductServicePropertyEnum[] iss = values();
        for (ProductServicePropertyEnum cs : iss) {
            if (cs.getCode().equals(code)) {
                return cs;
            }
        }
        return null;
    }
}
